package org.dyk.seamanshousefrontdesk.repository;

import org.dyk.seamanshousefrontdesk.model.Cart;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface CartRepository extends CrudRepository<Cart,Integer> {
    //根据用户ID 查询对应购物车信息
    public List<Cart> findAllByUid(int uid);

    //根据 主键 获取购物车信息
    public Cart findByCid(int cid);

    //根据商品ID 查询购物车信息
    public Cart findByGid(int gid);
}
